/*
    Project:        Home Power Control
    File:           HPCLogDevice.cpp
    Author:         christian@karunamusic.at
    Date:           01.2015
    Description:    Baseclass for subscribers of logmessages.
 */

#include "HPCLogDevice.h"

HPCLogDevice::HPCLogDevice( TLogLevel lv ) : QObject(), m_LogLevel(lv)
{
    HPCLogger *l = HPCLogger::getInstance();
    connect(l,SIGNAL(LogEvent(const HPCLogMessage&)),this,SLOT(OnLog(const HPCLogMessage&)));
}

HPCLogDevice::HPCLogDevice( const QString& lv ) : QObject(), m_LogLevel(disabled)
{
    HPCLogger *l = HPCLogger::getInstance();
    m_LogLevel = l->StringToLogLevel(lv);
    connect(l,SIGNAL(LogEvent(const HPCLogMessage&)),this,SLOT(OnLog(const HPCLogMessage&)));
}

HPCLogDevice::~HPCLogDevice()
{
}

